package com.hxzy.remote.fallback;

import com.hxzy.remote.UserServiceOpenFeignApi;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 *  用户远程访问的API,断熔服务
 *
 * @author tonneyyy
 */
 @Component
 @Log4j2
public class UserServiceOpenFeignApiFallBackFactory implements FallbackFactory<UserServiceOpenFeignApi> {
    @Override
    public UserServiceOpenFeignApi create(Throwable throwable) {
        log.error(throwable);

        return new UserServiceOpenFeignApi() {

        };
    }
}
